<?php declare(strict_types=1);


namespace App\Rpc\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 组织架构表
 * Class Organization
 *
 * @since 2.0
 *
 * @Entity(table="organization")
 */
class Organization extends Model
{
    /**
     * 主键id
     * @Id()
     * @Column()
     *
     * @var int
     */
    private $id;

    /**
     * 数据唯一ID
     *
     * @Column(name="item_id", prop="itemId")
     *
     * @var string
     */
    private $itemId;

    /**
     * 组织名称
     *
     * @Column()
     *
     * @var string
     */
    private $name;

    /**
     * 组织唯一值（供开发者读取），同一个权限系统内唯一，最长64个字符，不可为空
     *
     * @Column(name="permission_value", prop="permissionValue")
     *
     * @var string
     */
    private $permissionValue;

    /**
     * 角色id
     *
     * @Column(name="role_id", prop="roleId")
     *
     * @var string
     */
    private $roleId;

    /**
     * 是否冻结：0未冻结 1已冻结
     *
     * @Column(name="frozen_state", prop="frozenState")
     *
     * @var int|null
     */
    private $frozenState;

    /**
     * 创建时间 int
     *
     * @Column(name="created_at", prop="createdAt")
     *
     * @var int
     */
    private $createdAt;

    /**
     * 更新时间 int
     *
     * @Column(name="updated_at", prop="updatedAt")
     *
     * @var int|null
     */
    private $updatedAt;


    /**
     * @param int $id
     *
     * @return self
     */
    public function setId(int $id): self
    {
        $this->id = $id;

        return $this;
    }

    /**
     * @param string $itemId
     *
     * @return self
     */
    public function setItemId(string $itemId): self
    {
        $this->itemId = $itemId;

        return $this;
    }

    /**
     * @param string $name
     *
     * @return self
     */
    public function setName(string $name): self
    {
        $this->name = $name;

        return $this;
    }

    /**
     * @param string $permissionValue
     *
     * @return self
     */
    public function setPermissionValue(string $permissionValue): self
    {
        $this->permissionValue = $permissionValue;

        return $this;
    }

    /**
     * @param string $roleId
     *
     * @return self
     */
    public function setRoleId(string $roleId): self
    {
        $this->roleId = $roleId;

        return $this;
    }

    /**
     * @param int|null $frozenState
     *
     * @return self
     */
    public function setFrozenState(?int $frozenState): self
    {
        $this->frozenState = $frozenState;

        return $this;
    }

    /**
     * @param int $createdAt
     *
     * @return self
     */
    public function setCreatedAt(int $createdAt): self
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * @param int|null $updatedAt
     *
     * @return self
     */
    public function setUpdatedAt(?int $updatedAt): self
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * @return int
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getItemId(): ?string
    {
        return $this->itemId;
    }

    /**
     * @return string
     */
    public function getName(): ?string
    {
        return $this->name;
    }

    /**
     * @return string
     */
    public function getPermissionValue(): ?string
    {
        return $this->permissionValue;
    }

    /**
     * @return string
     */
    public function getRoleId(): ?string
    {
        return $this->roleId;
    }

    /**
     * @return int|null
     */
    public function getFrozenState(): ?int
    {
        return $this->frozenState;
    }

    /**
     * @return int
     */
    public function getCreatedAt(): ?int
    {
        return $this->createdAt;
    }

    /**
     * @return int|null
     */
    public function getUpdatedAt(): ?int
    {
        return $this->updatedAt;
    }

}
